package me.zhengjie.modules.fund.domain;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import me.zhengjie.base.BaseEntity;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Getter
@Setter
@Entity
@Table(name = "user_fund_flow")
public class UserFundFlow extends BaseEntity implements Serializable {
    @Id
    @Column(name = "id")
    @NotNull(groups = Update.class)
    @ApiModelProperty(value = "ID", hidden = true)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @NotNull(groups = Create.class)
    @ApiModelProperty(value = "用户id")
    private Long userId;

    @NotNull(groups = Create.class)
    @ApiModelProperty(value = "操作方向 0：卖 1：买")
    private Integer direction;

    @NotNull(groups = {Create.class})
    @ApiModelProperty(value = "基金编码")
    private String fundCode;

    @ApiModelProperty(value = "基金名称")
    private String fundName;

    @ApiModelProperty(value = "操作时间")
    private Date operateDate;

    @ApiModelProperty(value = "操作金额")
    private BigDecimal operateAmount;

    @ApiModelProperty(value = "操作份额")
    private BigDecimal operateCount;

    @ApiModelProperty(value = "服务费")
    private BigDecimal serviceFee;

    @ApiModelProperty(value = "成交净值")
    private BigDecimal confirmNetValue;

    @ApiModelProperty(value = "确认日期")
    private Date confirmDate;

    @ApiModelProperty(value = "确认状态  1 已确认 2 待确认（在途）")
    private Integer status;
}
